{include file="public/header"}
<body>
<form action="">
    <div class="menu-box">
        <table class="table table-bordered">
            <thead>
                <tr class="">
                    <th width="30" class="sorting_disabled" rowspan="1" colspan="1" style="width: 30px;">
                        <input name="id" type="checkbox" data-table-chckall="id" value="">
                    </th>
                    <th width="150" class="sorting_disabled" rowspan="1" colspan="1" style="width: 150px;">排序</th>
                    <th width="200" class="sorting_disabled" rowspan="1" colspan="1" style="width: 200px;">标题</th>
                    <th width="100" class="sorting_disabled" rowspan="1" colspan="1" style="width: 100px;">类型</th>
                    <th  rowspan="1"class="sorting_disabled" colspan="1" style="width: 773px;">值</th>
                    <th width="200" class="sorting_disabled" rowspan="1" colspan="1" style="width: 200px;">操作</th>
                </tr>
            </thead>
            <tbody>
            <tr  class="odd">
                <td style="line-height: 48px;"><input name="id" type="checkbox" value="1"></td>
                <td>
                    <div class="input-group">
                        <span class="input-group-addon" style="background:#565555;color:#fff">一级菜单</span>
                        <input type="text" name="LC[1][order_no]" class="ui-input met-center met-focus" value="1">
                    </div>
                </td>
                <td>
                    <input type="text" name="LC[1][name]" class="ui-input met-focus" value="卡友管家">
                </td>
                <td>
                    <select name="LC[1][type]" data-checked="">
                    <option value="click">关键词</option>
                        <option value="view">URL链接</option>
                        <option value="miniprogram">小程序</option></select>
                </td>
                <td>
                    <input type="text" name="LC[1][value]" class="ui-input met-focus" value="卡友管家">
                </td>
                <td>
                    <div class="btn-group">
                        <a  class="btn btn-info"  >添加二级菜单</a>
                        <a  class="btn btn-danger" data-confirm="确认删除？">删除</a>
                    </div>
                </td>
            </tr>
            <tr class="even newlist">
                <td style="line-height: 48px;">
                    <input name="id" type="checkbox" value="new-1513913663" checked="">
                    <input name="LC[new-1513913663][topid]" type="hidden" value="1">
                </td>
                <td>
                    <div class="input-group">
                        <span class="input-group-addon">
                            <img src="http://ky365/kyadmin/templates/met/images/bg_columnx.gif"> 二级菜单
                        </span>
                        <input type="text" name="LC[new-1513913663][order_no]" class="ui-input met-center" value="">
                    </div>
                </td>
                <td>
                    <input type="text" name="LC[new-1513913663][name]" class="ui-input" value="">
                </td>
                <td>
                    <select name="LC[new-1513913663][type]">
                        <option value="click">关键词</option>
                        <option value="view">URL链接</option>
                        <option value="miniprogram">小程序</option>
                    </select>
                </td>
                <td>
                    <input type="text" name="LC[new-1513913663][value]" class="ui-input" value="">
                </td>
                <td>
                    <a href="" class="btn btn-warning delet"style=" margin: 10px 0;">撤销</a>
                </td>
            </tr>
            </tbody>
            <tfoot>
                <tr>
                    <th rowspan="1" colspan="1" >
                        <input name="id" type="checkbox" data-table-chckall="id" value="">
                    </th>
                    <th colspan="5" rowspan="1">
                         <a href="javascript:;" class="btn btn-success">
                             <i class="fa fa-plus-circle"></i>
                             添加一级菜单
                         </a>
                    <input type="submit" name="save" value="保存菜单" class="btn btn-primary">
                    <input type="submit" name="del" value="批量删除" class="btn btn-danger" data-confirm="确认删除此菜单？">
                    <a  class="btn btn-info" data-confirm="确定获取已发布的微信菜单？获取后现有菜单将被删除！">获取菜单</a>
                    <a  class="btn btn-warning">发布菜单</a>
                </th></tr>
            </tfoot>
        </table>
        <div class="dataTables_info">显示第 0 至 0 项结果，共 0 项</div>
        <div class="dataTables_paginate paging_simple_numbers">
            <a class="paginate_button previous disabled met-focus">上页</a>
            <span>
                <a class="paginate_button current" aria-controls="DataTables_Table_0" data-dt-idx="1" tabindex="0">1</a>
            </span>
            <a class="paginate_button next disabled met-focus" >下页</a>
        </div>

    </div>
</form>
{include file="public/footer"}
<script>
    function addmenu() {
        layer.open({
            type: 2,
            area: ['90%', '90%'],
            maxmin: true,
            content: '/admin/wechat/menuedit/'
        });
    }

    function del(){
        var params  = {
            url: '{:url("menuadd")}',
            data: data.field,
            type: 'post',
            sCallback:function(res){
                layer.msg(res.msg,{time:1800},function(){
                    location.reload();
                });
            }
        };
        common.request(params);
    }
</script>

